﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GameFramework.Event;
using GameFramework;

namespace TowerDefence_Zombie
{
    public class GameEndEventArgs : GameEventArgs
    {
        public static readonly int EventId = typeof(GameEndEventArgs).GetHashCode();

        public EnumGameOverType EndType;

        public bool IsForceEnd;

        public GameEndEventArgs()
        {
            EndType = EnumGameOverType.Success;
            IsForceEnd = false;
        }

        public override int Id
        {
            get
            {
                return EventId;
            }
        }


        public object UserData
        {
            get;
            private set;
        }

        public static GameEndEventArgs Create(EnumGameOverType enumGame, bool forceEnd = false)
        {
            GameEndEventArgs playerHPChangeEventArgs = ReferencePool.Acquire<GameEndEventArgs>();
            playerHPChangeEventArgs.EndType = enumGame;
            playerHPChangeEventArgs.IsForceEnd = forceEnd;
            return playerHPChangeEventArgs;
        }

        public override void Clear()
        {
            EndType = EnumGameOverType.Success;
            IsForceEnd = false;
        }
    }

}

